# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-authenticator
pkgver=3.32.2
pkgrel=7
pkgdesc="A Two-Factor Authentication application"
url="https://gitlab.gnome.org/World/Authenticator"
arch="noarch !s390x !mips !mips64" # missing libhandy on s390x
license="GPL-3.0-only"
depends="python3 py3-otp py3-beautifulsoup4 py3-pillow py3-pyfavicon py3-pyzbar
	py3-yoyo-migrations libhandy py3-setuptools"
makedepends="meson gtk+3.0-dev libsecret-dev zbar-dev gobject-introspection-dev"
checkdepends="appstream-glib desktop-file-utils"
subpackages="$pkgname-lang"
source="https://gitlab.gnome.org/World/Authenticator/-/archive/$pkgver/Authenticator-$pkgver.tar.gz
	dont-require-py3-gettext-support.patch
	c222f505a8bf623fbf057f9e1ae0a52e9df3edb7.patch"
builddir="$srcdir/Authenticator-$pkgver"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="3bd78354f4d18052d03650b455f07fb7fa9bb5cba0b6c92dcbfb5158dcf500f0b7f84e0be8942e0fbb74b1cefcd9019941c758538e05144c469bbe47b4355ce0  Authenticator-3.32.2.tar.gz
04ce91e3c12503fb21728c39cf20ab1cd5c81f0ad7b5f6ecc875921c387df5fcc3edb4675e0015f1ba7eda71cf53246b9c14b819a11d5d151846112966aa10c0  dont-require-py3-gettext-support.patch
2976e634578152ea2e3effd963a542395c19b9f28d0227727896e559e64e83421669c94a424e75c2e89924ce9fe578469c3ecc987f8d96f1bd80c88acfa03038  c222f505a8bf623fbf057f9e1ae0a52e9df3edb7.patch"
